<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<div id="page-content-wrapper">

    <div id="page-title">
        <h3>
            产品类别
        </h3>
        <div id="breadcrumb-right">
            <div class="float-right">
                <a href="/product/type/add" class="btn medium primary-bg">
                    <span class="button-content">
                    <i class="glyph-icon icon-cog float-left"></i>
                    添加
                    </span>
                </a>
            </div>
        </div>
    </div>

    <div id="page-content">
        <table class="table" id="message_table">
            <thead>
            <tr>
                <th><nobr> 全选<input id="contr" name="confirm" type="checkbox" onclick="allChose();" /></nobr></th>
                <th>产品类别名称</th>
                <th>赎回方式</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>

            <tbody>
            <#list pager.list as type>
            <tr id="${type.id}">
                <td class="center">
                    <input name="confirm" type="checkbox" value="${replays.financing_id}"/>
                </td>
                <td>
                ${type.name}
                </td>
                <td class="center">
                <#if type.redeem=="EXPIRE_KEEP">
                	到期续买
                </#if>
                <#if type.redeem=="EXPIRE_REDEEM">
                	到期赎回
                </#if>
                </td>
                <td>
                    ${type.createDate?string("yyyy-MM-dd HH:mm:ss")}
                </td>
                <td>
                    <div class="dropdown">
                        <a href="javascript:;" title="" class="btn medium bg-gray" data-toggle="dropdown">
                                    <span class="button-content">
                                        <i class="glyph-icon font-size-11 icon-cog"></i>
                                        <i class="glyph-icon font-size-11 icon-chevron-down"></i>
                                    </span>
                        </a>
                        <ul class="dropdown-menu float-right">
                            <li>
                                <a href="/product/type/update/${type.id}" title="">
                                    <i class="glyph-icon icon-calendar mrg5R"></i>
                                    修改
                                </a>
                                <a href="/product/type/check/${type.id}" title="">
                                    <i class="glyph-icon icon-calendar mrg5R"></i>
                                    查看
                                </a>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>

            <input class="user_id hide" value="replays.user_id" />

            </#list>
            </tbody>

        </table>
        <div class="button-group center-div">
        ${pagerHelper.content}
        </div>
    </div>
</div>

<script language="JavaScript">
$(document).ready(function() {
	<#if msg!=null>
	$.jGrowl("${msg}", {sticky:!1,position:'bottom-right',theme:'bg-green'});
	</#if>

    <#if productTypeInUse!=null>
    $.jGrowl("${productTypeInUse}", {sticky:!1,position:'bottom-right',theme:'bg-red'});
    </#if>
});
</script>